package org.openwork.portlet.skillmanagement.service;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.util.ClassLoaderProxy;


/**
 * <a href="SkillCategoryServiceUtil.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class provides static methods for the
 * {@link SkillCategoryService} bean. The static methods of
 * this class calls the same methods of the bean instance. It's convenient to be
 * able to just write one line to call a method on a bean instead of writing a
 * lookup call and a method call.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       SkillCategoryService
 * @generated
 */
public class SkillCategoryServiceUtil {
    private static SkillCategoryService _service;

    public static org.openwork.portlet.skillmanagement.model.SkillCategory addSkillCategory(
        java.lang.String name, long userId, long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().addSkillCategory(name, userId, groupId);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory updateSkillCategory(
        long pk, java.lang.String name, long userId, long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().updateSkillCategory(pk, name, userId, groupId);
    }

    public static void deleteSkillCategory(long pk)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        getService().deleteSkillCategory(pk);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> search(
        long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().search(groupId);
    }

    public static int searchCount(long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().searchCount(groupId);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> search(
        long[] groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().search(groupId);
    }

    public static int searchCount(long[] groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().searchCount(groupId);
    }

    public static void clearService() {
        _service = null;
    }

    public static SkillCategoryService getService() {
        if (_service == null) {
            Object obj = PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
                    SkillCategoryService.class.getName());
            ClassLoader portletClassLoader = (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
                    "portletClassLoader");

            ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
                    SkillCategoryService.class.getName(), portletClassLoader);

            _service = new SkillCategoryServiceClp(classLoaderProxy);

            ClpSerializer.setClassLoader(portletClassLoader);
        }

        return _service;
    }

    public void setService(SkillCategoryService service) {
        _service = service;
    }
}
